<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.io.GrowBuffer</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.io.GrowBuffer");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327">tango.io.GrowBuffer</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: March 2004<br><br>
<b>author:</b><br>Kris<br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L26">GrowBuffer</a></span>
<script>explorer.outline.addDecl('GrowBuffer');</script> : Buffer;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Subclass to provide support for content growth. This is handy when
        you want to keep a buffer around as a scratchpad.</font><br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L39">this</a></span>
<script>explorer.outline.addDecl('this');</script>(uint <span class="funcparam">size</span> = 1024, uint <span class="funcparam">increment</span> = 1024);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a GrowBuffer with the specified initial size.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L53">this</a></span>
<script>explorer.outline.addDecl('this');</script>(IConduit <span class="funcparam">conduit</span>, uint <span class="funcparam">size</span> = 1024);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a GrowBuffer with the specified initial size.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void[] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L71">slice</a></span>
<script>explorer.outline.addDecl('slice');</script>(uint <span class="funcparam">size</span>, bool <span class="funcparam">eat</span> = true); [override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Read a chunk of data from the buffer, loading from the
                conduit as necessary. The specified number of bytes is
                loaded into the buffer, and marked as having been read 
                when the 'eat' parameter is set true. When 'eat' is set
                false, the read position is not adjusted.</font><br><br>
<font color="black">Returns the corresponding buffer slice when successful.<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>IBuffer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L101">append</a></span>
<script>explorer.outline.addDecl('append');</script>(void * <span class="funcparam">src</span>, uint <span class="funcparam">length</span>); [override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Append an array of data to this buffer. This is often used 
                in lieu of a Writer.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L119">fill</a></span>
<script>explorer.outline.addDecl('fill');</script>(InputStream <span class="funcparam">src</span>); [override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Try to fill the available buffer with content from the 
                specified conduit. </font><br><br>
<font color="black">Returns the number of bytes read, or IConduit.Eof
        
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L136">fill</a></span>
<script>explorer.outline.addDecl('fill');</script>(uint <span class="funcparam">size</span> = uint.max);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Expand and consume the conduit content, up to the maximum 
                size indicated by the argument or until conduit.Eof</font><br><br>
<font color="black">Returns the number of bytes in the buffer<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/GrowBuffer.d?rev=3327#L150">makeRoom</a></span>
<script>explorer.outline.addDecl('makeRoom');</script>(uint <span class="funcparam">size</span>); [private]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">make some room in the buffer
                        
</font><br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Tue Mar  4 22:45:33 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>